<template>
  <div class="hello">
    <h1>{{ msg }}</h1>
    <!-- <h2>Essential Links</h2> -->
    <h1 v-html = 'ceshi'>1111111111</h1>
    <h1 v-bind:class="{'class1': class1}" >{{texts2}}</h1>
    <h1 v-if= "texts"> 111</h1>
    <input v-model= "texts1" type="text" name="" value="">
    <button v-on:click="clicks" type="button" name="button">dsa </button>
  </div>
</template>

<script>
export default {
  name: 'helloword',
  data () {
    return {
      msg: 'Welcome to Your Vue.js App',
      ceshi: '这是什么玩意?',
      class1: true,
      texts: '',
      texts1: '1234',
      texts2: '这玩意不是红色'
    }
  },
  methods: {
    clicks: function () {
      console.log(this)
      this.texts2 = this.texts2.split('').reverse().join('')
      console.log(this.texts2)
    }
  }
}
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped>
h1, h2 {
  font-weight: normal;
}
ul {
  list-style-type: none;
  padding: 0;
}
li {
  display: inline-block;
  margin: 0 10px;
}
a {
  color: #42b983;
}
.class1{
  color:red;
}
</style>
